/**
 * 2017年8月22日
 */
package exp.config;

import org.apache.catalina.startup.Tomcat;
import org.springframework.beans.factory.config.PropertiesFactoryBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.io.ClassPathResource;
import org.springframework.core.io.Resource;

/**
 * @author Alex
 *
 */
@Configuration
public class SpringConfiguration {
	@Bean(name="setting")
	PropertiesFactoryBean get1(){
		PropertiesFactoryBean pfb = new PropertiesFactoryBean();
		pfb.setLocations(new Resource[]{new ClassPathResource("application.properties")});
		return pfb;
	}
	Tomcat get2(){
		Tomcat t = new Tomcat();
		t.setBaseDir("");
		return t;
	}
	
}
